﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <script src="~/Content/js/jquery-1.8.2.js"></script>
</head>
<body>
    <div>
        <input id="btn_cross" type="button" value="跨域请求" />
    </div>
    <script type="text/javascript">
        $("#btn_cross").click(function () {
            $.ajax({
                type: "POST",
                //url: "http://tjzheng.example.com/action/crossdomain",
                url: "http://tjzheng.example.com/action/jsonptest",
                data: { s1: "s1", s2: "s2" },
                //dataType: "json",
                dataType: "jsonp",
                success: function (data) {
                    alert(data.zoo);
                }
            });
        });
    </script>
</body>
</html>
